package com.an.homework;

public class HomeWork_2 {
    public static void main(String[] args) {
        Animal cat=new Cat();
        Animal dog = new Dog();
        cat.shout();
        dog.shout();
    }

}

abstract class Animal{
    abstract public void shout();
}

class Cat extends Animal{

    @Override
    public void shout() {
        System.out.println("小猫喵喵喵");
    }
}

class Dog extends Animal{
    @Override
    public void shout(){
        System.out.println("小狗 汪汪汪");
    }
}